package com.apartment.own.domain.enums;


import com.baomidou.mybatisplus.annotation.IEnum;

import java.io.Serializable;

/**
 * des. 租金付款方式
 *
 * @author :  RazaJin
 * @createDate :  2020/9/1 0001 下午 3:05
 */
public enum LeasePaymentTypeEnum implements IEnum {

    /**
     *
     */
    TYPE11(1, "一月一次", 1),
    /**
     *
     */
    TYPE21(2, "两月一次", 0),
    /**
     *
     */
    TYPE31(3, "三月一次", 0),
    /**
     *
     */
    TYPE41(4, "四月一次", 0),
    /**
     *
     */
    TYPE61(5, "半年一次", 0),
    /**
     *
     */
    TYPE121(6, "一年一次", 0),
    /**
     *
     */
    TYPE1(7, "一次付清", 0);


    private Integer id;
    private String name;
    private Integer select;

    LeasePaymentTypeEnum(Integer id, String name, Integer select) {
        this.id = id;
        this.name = name;
        this.select = select;
    }


    public static LeasePaymentTypeEnum getEnum(int id) {
        for (LeasePaymentTypeEnum enums : LeasePaymentTypeEnum.values()) {
            if (enums.getValue().equals(id)) {
                return enums;
            }
        }
        return null;
    }


    public Integer getSelect() {
        return select;
    }

    public void setSelect(Integer select) {
        this.select = select;
    }

    @Override
    public Serializable getValue() {
        return this.id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

